/*
 * This file is part of "IdeWiki" project.
 *
 * Copyright (c) 2008 Hendrik Ebel
 * All Rights Reserved.
 *
 * Please visit http://code.google.com/p/idewiki for updates and contact.
 *
 * --LICENSE NOTICE--
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 3
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; If not, see <http://www.gnu.org/licenses/>.
 * --LICENSE NOTICE--
 */
package ws.ebel.idewiki.editors;

import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.contentassist.ContentAssistant;
import org.eclipse.jface.text.contentassist.IContentAssistant;
import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.jface.text.source.SourceViewerConfiguration;

/**
 * The Class IdeWikiEditorConfiguration.
 */
public class IdeWikiEditorConfiguration extends SourceViewerConfiguration {

    /** The Constant SNIPSNAP_MACRO_TYPE. */
    private static final String SNIPSNAP_MACRO_TYPE = "snipsnap_macro_type";

    /**
     * Gets the content assistant.
     * 
     * @param sourceViewer the source viewer
     * 
     * @return the content assistant
     */
    @Override
    public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
        ContentAssistant assistant = new ContentAssistant ();
        //assistant.setContentAssistProcessor(new JavaAssistProcessor(), IDocument.DEFAULT_CONTENT_TYPE);
        assistant.setContentAssistProcessor(new SnipSnapMacroProcessor(), IDocument.DEFAULT_CONTENT_TYPE);
        assistant.install(sourceViewer);
        
        return assistant;
    }
    
//    @Override
//    public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
//        return new String[] {
//            IDocument.DEFAULT_CONTENT_TYPE,
//            XMLPartitionScanner.XML_COMMENT,
//            XMLPartitionScanner.XML_TAG };
//    }

}
